package research.model;

import java.util.ArrayList;
import java.util.List;

import research.entity.Entity;
import research.entity.EntityType;

public class BaseHierarchy implements IHierarchyProvider {
	private EntityType rootType;
	protected List<EntityType> types;
	
	public BaseHierarchy(EntityType rootType) {
		super();
		this.rootType = rootType;
		types = new ArrayList<EntityType>();
		types.add(rootType);
	}

	@Override
	public List<Entity> getChildren(Entity entity) {
		return new ArrayList<Entity>();
	}

	@Override
	public Entity getParent(Entity entity) {
		return null;
	}

	@Override
	public EntityType getRootType() {
		return rootType;
	}

	@Override
	public boolean hasChildren(Entity entity) {
		return false;
	}

	@Override
	public boolean supportsType(EntityType type) {
		return types.contains(type);
	}

	public List<EntityType> getTypes() {
		return types;
	}

	public void setTypes(List<EntityType> types) {
		this.types = types;
	}
	
	

}
